<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/7/16
 * Time: 15:57
 */

namespace app\index\controller;

use think\Controller;
use think\Url;
url::root('/index.php');

class Article extends Controller
{
    public function index(){
//        $id = $_REQUEST['id'];
        $this->assign('title','article');
        return view('index');
    }

    public function ueditor()
    {
        $cate = db('cate')->select();

        $this->assign('title','ueditor');
        return view('ueditor',['cate'=>$cate]);
    }

    public function tinymce()
    {
        $this->assign('title','');
        return view('tinymce');
    }

    public function save()
    {
        echo json_encode($_POST);
        $data = [
            'title'         =>  $_POST['title'],
            'content'       =>  $_POST['content'],
        ];
    }
}